﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="Label1" runat="server" Text="用户登入表" Font-Size="X-Large"></asp:Label>
            <br/>
            姓名：&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="姓名不能为空" Display="Dynamic" ControlToValidate="TextBox1"></asp:RequiredFieldValidator><asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="不能为admin" Display="Dynamic" ControlToValidate="TextBox1" OnServerValidate="CustomValidator1_ServerValidate" Font-Bold="True" ForeColor="#FF5050"></asp:CustomValidator>
            <br/>
            密码：&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
            <br/>
            验证密码：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="必须再次输入密码" ControlToValidate="TextBox3"></asp:RequiredFieldValidator><asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码必须一致" ControlToCompare="TextBox2" ControlToValidate="TextBox3"></asp:CompareValidator>
            <br/>
            年龄：&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄范围错误，应为0~100" MaximumValue="100" MinimumValue="0" ControlToValidate="TextBox4" Type="Integer"></asp:RangeValidator>
            <br/>
            出生日期：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="出生日期超出1990-01-01~当前时间的范围！" ControlToValidate="TextBox5" MinimumValue="1990-01-01" Display="Dynamic" Type="Date"></asp:RangeValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="日期格式必须为：2000-01-01" ControlToValidate="TextBox5" ValidationExpression="\d{4}-\d{2}-\d{2}"></asp:RegularExpressionValidator>       
            <br/>
            毕业时间：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator3" runat="server" ErrorMessage="毕业时间不能早于等于出生时间！" ControlToValidate="TextBox6" ControlToCompare="TextBox5" Operator="GreaterThan"></asp:CompareValidator>
            <br/>
            电子邮箱：<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="格式错误"  ControlToValidate="TextBox7" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            <br/>
            头像：&nbsp;&nbsp; <asp:FileUpload ID="F" runat="server" />
            <asp:Image ID="Image1" runat="server" />
            <br/>
             <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
             <asp:Literal ID="Literal1" runat="server"></asp:Literal>
             <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" ShowMessageBox="True" />
        </div>
    </form>
</body>
</html>
